#include <stdio.h> 
#include <signal.h> 
#include <unistd.h> 
int count=0; 
void (* old_handler)(int); 
void ctrl_c(int signum) 
{ 
	(void) signal(SIGINT,ctrl_c); 
	++count; 
}
int main() 
{ 
	int c; 
	old_handler=signal(SIGINT,ctrl_c); 
	while((c=getchar())!='\n'); 
	printf("ctrl_c_count=%d\n",count); 
	(void) signal(SIGINT,old_handler); 
	while ((c=getchar())!='\n'); 
} 
	
